import tkinter
import webbrowser
root = tkinter.Tk()
text = tkinter.Text(root,width=20,height=15)
text.pack()
text.insert('end', 'i am djy')
text.tag_add('tag','1.5','end')
text.tag_config('tag',foreground='blue',underline=True)
def show(event):
    text.config(cursor='arrow')
def show2(event):
    text.config(cursor='xterm')
def click(event):
   webbrowser.open('http://www.baidu.com')
text.tag_bind('tag','<Enter>',show)
text.tag_bind('tag','<Leave>',show2)
text.tag_bind('tag','<Button-1>',click)

root.mainloop()